import { userStore } from "@/store/modules/user/user";
import { App } from "vue";

export const auth = (app: App) => {
  app.directive("auth", {
    beforeMount(el: HTMLElement) {
      const user = userStore();
      if (!user.user.admin) {
        el.style.display = "none";
      }
    }
  });
};
